package net.ojbk.study.twobox.beans.form.query;

import net.ojbk.study.twobox.beans.form.InputItem;
import net.ojbk.study.twobox.beans.po.Department;
import net.ojbk.study.twobox.beans.po.Post;
import net.ojbk.study.twobox.dao.DepartmentMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: twobox
 * Date: 2019/4/12
 * Time: 13:18
 * Description: No Description
 */
@Component
public class PostQueryForm extends SupperQueryForm<Post> {
    InputItem inputItemDeoartment = new InputItem("部门", "depid", "0", "select", null);

    @Autowired
    public PostQueryForm() {
        this.inputItems.add(inputItemDeoartment);
        this.inputItems.add(new InputItem("职务名称", "postname", "开发部", "text"));
    }

    @Override
    public List<InputItem> getInputItems() throws Exception {
        inputItemDeoartment.setOther(this.selectOptionUtil.getSelectOptionListByName("department"));
        return super.getInputItems();
    }
}
